package model;

import java.util.ArrayList;

public class Patient {
	private String cprno;
	private String name;
	private double weight;

	public Patient(String cprno, String name, double weight) {
		this.cprno = cprno;
		this.name = name;
		this.weight = weight;
	}

	private ArrayList<Prescription> prescriptions = new ArrayList<Prescription>();

	public void movePerson(Prescription prescription, Patient patient) {
		prescriptions.remove(prescription);
		patient.addPerson(prescription);
	}

	public String getCprno() {
		return cprno;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public double getWeight() {
		return weight;
	}

	public void setWeight(double weight) {
		this.weight = weight;
	}

	public void addPerson(Prescription prescription) {
		prescriptions.add(prescription);
	}

	public String toString() {
		return name + "  " + cprno;
	}

	public ArrayList<Prescription> getPrescriptions() {
		return prescriptions;
	}

}
